<template>
  <div class="detail-card" @click="gotoDetail(data, router, axios)">
    <img :src="data.icon" alt="" />
    <div class="content">
      <p class="title"> {{data.name}} </p>
      <p class="type">{{data.thirdStageName}}</p>
      <p class="size">大小：{{data.size}}</p>
    </div>
    <div class="btn" @click.stop="downloadUrl(data.highSpeedUrlOne,data.id)">立即下载</div>
  </div>
</template>
  
  <script setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router";
const router = ref(useRouter());
const props = defineProps({
    data: {
        type: Object,
        default: () => {}
    }
});

</script>
  
  <style lang="less" scoped>
.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-card {
    padding: 8px;
    border-radius: 8px;
    position: relative;
    width: 252px;
    height: 88px;
    cursor: pointer;
    img {
        display: inline-block;
        width: 72px;
        height: 72px;
        border-radius: 8px;
        margin-right: 8px;
        transform: all 0.1s;
    }
    .content {
        display: inline-block;
        position: absolute;
        margin-bottom: 0;
    }
    .title {
        font-size: 16px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #1d2127;
        line-height: 16px;
    }
    .type {
        margin-bottom: 8px;
        font-size: 12px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #93999e;
        line-height: 12px;
    }
    .size {
        font-size: 12px;
        font-family: GoogleSans-Regular, GoogleSans;
        font-weight: 400;
        color: #93999e;
        line-height: 12px;
    }
    .btn {
        display: inline-block;
        position: absolute;
        right: 5px;
        margin-top: 22px;
        vertical-align: top;
        text-align: center;
        width: 64px;
        height: 32px;
        line-height: 32px;
        background: #ffffff;
        border-radius: 4px;
        border: 1px solid #93999e;
        font-size: 14px;
        color: #545759;
    }
    &:hover {
        background-color: #eee;
        .title {
            color: @link-color;
        }
        .btn {
            background-color: @theme-color;
            border-color: @theme-color;
            color: #fff;
        }
        img {
            margin-top: -4px;
            margin-left: -4px;
            width: 80px;
            height: 80px;
            margin-right: 4px;
        }
    }
}

.el-rate {
    &::v-deep(.el-rate__icon) {
        font-size: 12px;
        margin-right: 0px;
    }
}
</style>